<template>
  <FormItem
    :label="label"
    :prop="prop"
    :label-width="labelWidth"
    :rules="rules"
  >
    <i-input
      type="textarea"
      v-model="currentValue"
      :placeholder="placeholder ? placeholder : `请填写${text}`"
      :autosize="{minRows: minRows || 2, maxRows: maxRows || 4}"
      :size="size"
    ></i-input>
    <slot></slot>
  </FormItem>
</template>

<script>
import commonItem from './commonItem'
import { FormItem, Input } from 'view-design'
export default {
  name: 'TextareaItem',
  components: { FormItem, 'i-input': Input },
  mixins: [commonItem],
  props: {
    minRows: {
      type: Number
    },
    maxRows: {
      type: Number
    }
  }
}
</script>
